home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / wodim.preinst < prev    next >
Text File  |  2009-10-02  |  2KB  |  52 lines

  1. #!/bin/sh
  2.  
  3. # order in descending importance. The loop could be separated, but I have this
  4. # set of checksums now, too lazy for research to separate that again
  5. if [ "$1" = "upgrade" ] ||  [ "$1" = "install" ] ; then
  6.    # first kill old conffiles, then possible dangling symlinks created by that action
  7.    for CONF in /etc/default/wodim /etc/rscsi.conf /etc/default/cdrecord /etc/default/rscsi \
  8.       /etc/cdrecord/cdrecord /etc/cdrecord/rscsi \
  9.       /etc/wodim/wodim /etc/wodim/rscsi
  10.    do
  11.       SUM="$(md5sum $CONF 2>/dev/null | cut -f1 -d\  )"
  12.       # missing, empty, unchanged files
  13.       case "$SUM" in
  14.          00118d4a9c94c41d3ae415638cc055dd |\
  15.          0bcdd41f5d7c6419d524b234701d18f0 |\
  16.          1d2c06f0d52fae533ef0cd58b80d22e4 |\
  17.          3016370f809f8bca713a2eee1ecbeb2d |\
  18.          68e2b3b297d6b5cb0c6beb9136f2d918 |\
  19.          6e3ce0b42b8971f0b10958ab6982b441 |\
  20.          84e0801d1ca1b9d309532385c5864786 |\
  21.          8c3e4a320aafda37f162a12526c0d431 |\
  22.          d41d8cd98f00b204e9800998ecf8427e |\
  23.          e05fdb0a48542ccbff5b28b100d083e3 |\
  24.          e7e6151fe872d56351d04f4c2c3d9722 |\
  25.          eff315991af0911ae8c96b9500c1714f |\
  26.          7a4383a7c0995736dee9d646b0724d08 |\
  27.          "")
  28.          rm -f $CONF
  29.          ;;
  30.          *)
  31.          case $CONF in
  32.             *rscsi|*rscsi.conf)
  33.             if ! test -e /etc/netscsid.conf ; then
  34.                cp $CONF /etc/netscsid.conf || true
  35.             fi
  36.             ;;
  37.             *)
  38.             if ! test -e /etc/wodim.conf ; then
  39.                cp $CONF /etc/wodim.conf || true
  40.             fi
  41.             ;;
  42.          esac
  43.          ;;
  44.       esac
  45.    done
  46.    # drop directories but only if empty
  47.    test -d /etc/cdrecord && rmdir /etc/cdrecord 2>/dev/null || true
  48.    test -d /etc/wodim && rmdir /etc/wodim 2>/dev/null || true
  49. fi
  50.  
  51.  
  52.